<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <canvas id="canvas-1" width="300" height="300"></canvas>
  <script>
    let cvs = document.getElementById('canvas-1')
    let ctx = cvs.getContext('2d')
    ctx.strokeStyle = 'red'
    ctx.beginPath()
    ctx.moveTo(50, 50)
    ctx.lineTo(200, 300)
    ctx.lineTo(120, 300)
    ctx.closePath()
    ctx.stroke()

    ctx.strokeStyle = 'green'
    ctx.beginPath()
    ctx.moveTo(50,50)
    ctx.arcTo(200, 300, 120, 300, 10* Math.PI)
    // ctx.closePath()
    ctx.stroke()
  </script>
</body>
</html>